import { createHashRouter } from "react-router-dom";
import type { RouteObject } from "react-router-dom";
import viewsMap from "./viewsMap";
import HL_Layout from "@layouts/HL_Layout";

const routes: RouteObject[] = [
  {
    path: "/",
    Component: HL_Layout,
    children: [
      {
        path: "/dashboard",
        Component: viewsMap["Dashboard"],
      },
    ],
  },
  {
    path: "/login",
    Component: viewsMap["Login"],
  },
  {
    path: "*",
    Component: viewsMap["NotFound"],
  },
];

const router = createHashRouter(routes);

export default router;
